package com.lmn.bus.rocketmq.event;

import org.springframework.context.ApplicationListener;
import org.springframework.context.annotation.Configuration;

import java.util.Map;
import java.util.Set;

@Configuration
public class MyListener implements ApplicationListener<MyRemoteApplicationEvent> {

    @Override
    public void onApplicationEvent(MyRemoteApplicationEvent event) {
        Map<String, String> values = event.getValues();
        Set<Map.Entry<String, String>> entrySet = values.entrySet();
        System.out.println("===========================================================================");
        for (Map.Entry<String, String> entry : entrySet) {
            System.out.println("===============" + entry.getKey() + ":" + entry.getValue() + "==============");
        }
        System.out.println("===========================================================================");
    }
}
